package cn.example.config;

import cn.example.pojo.Department;
import cn.example.pojo.Employee;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class GLConfig {

    @Bean
    public Department department(){
        Department department = new Department();
        department.setDId(1);
        department.setDName("测试部门");
        return department;
    }

    @Bean
    public Employee employee(){
        Employee employee = new Employee();
        employee.setName("张三");
        employee.setDepartmentId(department());
        return employee;
    }
}
